#include "types.h"
#include "expandkey.h"
#include "twofish.h"

extern void enable_round_print(int);
extern void set_round_print(int);

#include <stdio.h>
#include <stdlib.h>

int main()
{
	byte original_key[16] = {
		0
	};
	byte plaintext[16] = {
		0
	};
	byte cipher[16];

	enable_round_print(1);
	set_round_print(2);

	key_type key;
	pre_expand_key(original_key, 16, &key);

	while(1)
	{
		int i, tmp;
		for(i = 0; i < 16; ++i)
		{
			int ret = scanf("%x", &tmp);
			if(ret == EOF)
			{
				exit(0);
			}
			plaintext[i] = tmp;
		}
		twofish_128_encrypt(plaintext, cipher, &key);
	}

	return 0;

}
